<?php

namespace plugin\agent\app\admin\validate;

use app\common\validate\BaseValidate;

class LevelValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require',
        'level' => 'require',
        'name' => 'require',
        'rate' => 'require',
        'level_up_way' => 'require',
        'config' => 'require',
    ];

    protected $field = [
        'id' => 'ID',
        'level' => '等级值',
        'name' => '等级名称',
        'rate' => '上浮分成比例',
        'level_up_way' => '升级方式', // 1:满足任意条件 2:满足全部条件
        'config' => '配置信息',
    ];
    protected $scene = [
        "id" => [
            'id',
        ],
        "add" => [
            'level',
            'name',
            'rate',
            'level_up_way',
            'config',
        ],
        "update" => [
            'id',
            'level',
            'name',
            'rate',
            'level_up_way',
            'config',
        ],
    ];
}